Skip to content

docs: update libcamera installation to use Debian official packaging repository#1578

Open
tangzz-radxa wants to merge 2 commits intoradxa-docs:mainfrom
tangzz-radxa:fix/libcamera-debian-packaging
Open

docs: update libcamera installation to use Debian official packaging repository#1578
tangzz-radxa wants to merge 2 commits intoradxa-docs:mainfrom
tangzz-radxa:fix/libcamera-debian-packaging

Conversation

@tangzz-radxa
Copy link
Copy Markdown
Contributor

修改内容

根据内部技术支持需求,更新 Radxa Docs 中关于 libcamera 编译安装和启动摄像头实例的内容:

1. libcamera 编译安装方法

2. 启动摄像头实例

  • 原方法:使用 qcam 启动摄像头
  • 新方法:使用 GStreamer 管道,使用 libcamera 元素 -> autovideosink 元素

修改的文件

中文版本 (docs/dragon/q6a/accessories/):

  • camera-12m-577.md
  • camera-8m-219.md
  • camera-4k.md
  • camera-13m-214.md

英文版本 (i18n/en/docusaurus-plugin-content-docs/current/dragon/q6a/accessories/):

  • camera-12m-577.md
  • camera-8m-219.md
  • camera-4k.md
  • camera-13m-214.md

具体修改内容

libcamera 安装部分

# 安装构建依赖
sudo apt update
sudo apt install -y devscripts build-essential debhelper dh-make quilt git

# 克隆 Debian 官方 libcamera 仓库
git clone https://salsa.debian.org/multimedia-team/libcamera.git
cd libcamera

# 切换到 debian/0.4.0-7 分支
git checkout debian/0.4.0-7

# 安装构建依赖
sudo mk-build-deps --install --remove debian/control

# 构建 deb 包
dpkg-buildpackage -us -uc -b

# 安装构建的 deb 包
cd ..
sudo dpkg -i libcamera*.deb libcamera-dev*.deb libcamera-tools*.deb || sudo apt-get install -f -y

启动摄像头部分

# 安装 GStreamer 相关包
sudo apt install -y gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly

# 启动摄像头预览
gst-launch-1.0 libcamerasrc ! autovideosink

# 指定分辨率、帧率等参数
gst-launch-1.0 libcamerasrc ! video/x-raw,width=1920,height=1080,framerate=30/1 ! autovideosink

影响

此修改确保用户可以使用更稳定、维护更好的 Debian 官方打包版本,并使用更通用的 GStreamer 管道来启动摄像头,提高兼容性和易用性。

@tangzz-radxa tangzz-radxa requested a review from a team as a code owner April 3, 2026 08:25
@CodeChenL
Copy link
Copy Markdown
Contributor

@copilot review this pr

@CodeChenL
Copy link
Copy Markdown
Contributor

copilot只会响应我提的pr

@tangzz-radxa
Copy link
Copy Markdown
Contributor Author

Thanks for the notes about copilot. The PR is ready for review by the editor team.

- Update 'Erase SPI Flash' link from ../../low-level-dev/maskrom/erase to ../../getting-started/install-os/erase_spi-flash
- Update rkdeveloptool/rkdevtool links from ../../low-level-dev/maskrom/{linux,mac-os,windows} to ../../low-level-dev/install-os/rkdevtool_use with tab anchors (#tab-linux, #tab-macos, #tab-windows)
- Fixes broken links due to directory structure change in Rock 5B documentation
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Radxa Dragon Q6A camera accessory docs to switch libcamera installation from upstream source builds to Debian’s official packaging repository workflow, and updates camera preview examples to use a GStreamer pipeline instead of qcam.

Changes:

  • Replace libcamera build-from-upstream steps with Debian packaging repo (salsa.debian.org) + dpkg-buildpackage flow.
  • Update “start camera” instructions to use gst-launch-1.0 libcamerasrc ! autovideosink.
  • Adjust config-file guidance (notably for IMX219) to account for Debian-packaged file locations.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
i18n/en/docusaurus-plugin-content-docs/current/dragon/q6a/accessories/camera-8m-219.md Switches libcamera install steps to Debian packaging; updates camera preview to GStreamer; adjusts config guidance.
i18n/en/docusaurus-plugin-content-docs/current/dragon/q6a/accessories/camera-4k.md Switches libcamera install steps to Debian packaging; updates camera preview to GStreamer.
i18n/en/docusaurus-plugin-content-docs/current/dragon/q6a/accessories/camera-13m-214.md Switches libcamera install steps to Debian packaging; updates camera preview to GStreamer.
i18n/en/docusaurus-plugin-content-docs/current/dragon/q6a/accessories/camera-12m-577.md Switches libcamera install steps to Debian packaging; updates camera preview to GStreamer.
docs/dragon/q6a/accessories/camera-8m-219.md 中文版:切换为 Debian 打包仓库自打包安装;使用 GStreamer 启动预览;更新配置文件定位说明。
docs/dragon/q6a/accessories/camera-4k.md 中文版:切换为 Debian 打包仓库自打包安装(但页面当前不完整)。
docs/dragon/q6a/accessories/camera-13m-214.md 中文版:切换为 Debian 打包仓库自打包安装;使用 GStreamer 启动预览。
docs/dragon/q6a/accessories/camera-12m-577.md 中文版:切换为 Debian 打包仓库自打包安装;使用 GStreamer 启动预览。

Comment on lines +74 to +76
### Modify configuration file

Enter the `libcamera` directory and edit `libcamera/src/ipa/simple/data/imx219.yaml`.
When using Debian packaged libcamera, the configuration file path may be different. If you need to modify the configuration file:
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated instructions say the config file path differs for Debian-packaged libcamera, but the following step still refers to copying content into src/ipa/simple/data/imx219.yaml (source-tree path). Please update the surrounding text to consistently reference the installed config path you locate (or explain which package path to modify).

Copilot uses AI. Check for mistakes.
Comment on lines +74 to 75
### 设置权限

Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description says the camera start example was updated to use a GStreamer pipeline. This page currently stops at the permissions section and no longer includes any “启动摄像头(使用 GStreamer)” steps like the other camera pages, so the change is incomplete here.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

只要调用到libcamera组件都需要调整dma节点权限

- Change libcamera installation from direct compilation to Debian packaging
- Use debian/0.4.0-7 branch from salsa.debian.org/multimedia-team/libcamera
- Update camera preview to use gstreamer libcamera element -> autovideosink
- Install gstreamer1.0-libcamera plugin for gstreamer integration
- Optimize installation commands using apt-get install for dependency handling
@tangzz-radxa tangzz-radxa force-pushed the fix/libcamera-debian-packaging branch from 31b404a to 101dd32 Compare April 7, 2026 09:35
@CodeChenL
Copy link
Copy Markdown
Contributor

待验证

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants